<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <canvas style="border:1px solid #ffdee9;" width="600" height="400"></canvas>
</body>
<script>
    // 获取画布
    let canvas = document.querySelector("canvas")
    // 获取一支笔
    let ctx = canvas.getContext("2d")
    // 圆弧的路径
    ctx.arc(300,200,100,0,Math.PI/180*90,true)   //  半圆
    ctx.lineTo(300,200)
    ctx.closePath()

    // 描边
    ctx.strokeStyle="#584e49"
    ctx.stroke()


    // 填充
    ctx.fillStyle="#ffdee9"
    ctx.fill()




</script>

</html>